package com.sc.nft.helper;

import com.sc.nft.entity.dto.ReportSaveDTO;
import com.sc.nft.enums.StatisticalStatementEnum;

import java.math.BigDecimal;
import java.util.List;

public class ReportOverviewHelper {

    public static void generalReportingMethod(List<ReportSaveDTO> list, StatisticalStatementEnum statisticalStatementEnum, String data){
        list.add(new ReportSaveDTO(statisticalStatementEnum.getCode(),
                statisticalStatementEnum.getDescribe(),
                data));
    }
    public static void generalReportingMethod(List<ReportSaveDTO> list, StatisticalStatementEnum statisticalStatementEnum, BigDecimal data){
        list.add(new ReportSaveDTO(statisticalStatementEnum.getCode(),
                statisticalStatementEnum.getDescribe(),
                data.setScale(2,BigDecimal.ROUND_HALF_UP).toPlainString()));
    }
}
